import request from '@/utils/request'

// 查询房屋具体信息
export const getDetail = (id) => {
  return request.get(`/houses/${id}`)
}

// 发布房源
export const addHouseList = (data) => {
  return request.post('/user/houses', data)
}

// 房屋图像上传
export const uploadImg = (data) => {
  return request.post('/houses/image', data)
}

// 发布房源需要的条件
export const houseCondition = () => {
  return request.get('/houses/params')
}

// 根据条件查询房屋
export const lookHouse = () => {
  return request.get('/houses')
}
// 获取房屋查询条件
export const lookHouseConditon = (id) => {
  return request.get('/houses/condition', {
    params: { id }
  })
}
